package GUI.ventas;

import java.awt.BorderLayout;
import java.sql.Connection;

import javax.swing.JFrame;
import javax.swing.JPanel;

import GUI.Principal;


public class GUI_Ventas extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * @param args
	 */
	

	
	private Compra _tPV;
	private CategoriasYPago _panelEste;
	private Connection BD;


	
	
	public GUI_Ventas(Connection c)
	{
		this.BD=c;
		initialize();
		////////////////////////?¿?¿¿?¿?¿?¿?¿?
		FachadaVentas fachada = new FachadaVentas();

		//this.setVisible(true);
	}
	
	private void initialize()
	{
		this.setBounds(100, 100, 1024, 600);
		this.setLayout(new BorderLayout(2, 2));
		this.construyeTPV(BD);
		this.construyePanelProductos(BD);

		
		
	}
	
	
	/**
	 * 
	 * TPV
	 */
	
	public void construyeTPV(Connection c)
	{
		_tPV = new Compra(c);
		this.add(_tPV, BorderLayout.WEST);

	}
	
	public void construyePanelProductos(Connection c)
	{
		_panelEste = new CategoriasYPago(_tPV,c);
		this.add(this._panelEste, BorderLayout.CENTER);
	}


}
